package com.monkeysonnet.b2dFluent;

import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.PolygonShape;

public class PolygonFactory extends FixtureFactory<PolygonFactory>
{
	private PolygonShape _shape;
	
	public PolygonFactory()
	{
		this(false);
	}
	
	PolygonFactory(boolean managed)
	{
		super(managed);
		_shape = new PolygonShape();
		_def.shape = _shape;
	}
	
	public PolygonFactory set(Vector2[] verts)
	{
		_shape.set(verts);
		return this;
	}

	@Override
	public void free()
	{
		B2d.free(this);
	}
}
